home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / programm.ing / nt_dsp1.lzh / NT_DSP1.MSA / LFLTS / LATFIR2.ASM < prev    next >
Assembly Source File  |  1989-01-24  |  1KB  |  41 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Lattice FIR Filter Macro (modified modulo count).
  6. ; Last Update 08 Aug 86   Version 1.0
  7. ;
  8. latfir2 macro   order
  9. latfir2 ident   1,0
  10. ;
  11. ;       LATTICE FIR
  12. ;
  13. ;       Lattice FIR filter macro
  14. ;
  15. ;       Input value in register B, output value in register B.
  16. ;
  17. ;       Macro call:     latfir2 order
  18. ;               order   - order of filter (number of K coefficients)
  19. ;
  20. ;       Alters Data ALU Registers:
  21. ;       x0      y0      y1      a       b
  22. ;
  23. ;       Alters Address Registers:
  24. ;       r0      r4
  25. ;
  26. ;       Alters Program Control Registers:
  27. ;       pc      sr
  28. ;
  29. ;       Uses 2 locations on stack
  30. ;
  31.   move           b,x:(r0)+    y:(r4)+,y0  ;sv B as fst st., mv fst k
  32.   do    #order,_endlat
  33.   move           x:(r0),a     b,y1        ;get state, set t for mul by k
  34.   macr  y1,y0,a  a,x0                     ;t*k+s, copy s
  35.   macr  x0,y0,b  a,x:(r0)+    y:(r4)+,y0  ;s*k+t, sv st., nxt k
  36. _endlat
  37.   move           x:(r0)-,x0   y:(r4)-,y0  ;adjust pointers
  38.   endm
  39.